package com.saiyaemon.blog.pojo;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(name = "article_tag")
public class ArticleTag implements Serializable {
	/**
	 * 文章id
	 */
	@Column(name = "article_id")
	private Integer articleId;

	/**
	 * 标签id
	 */
	@Column(name = "tag_id")
	private Integer tagId;

	private static final long serialVersionUID = 1L;

	public ArticleTag(Integer articleId, Integer tagId) {
		super();
		this.articleId = articleId;
		this.tagId = tagId;
	}

	public ArticleTag() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Integer getArticleId() {
		return articleId;
	}

	public void setArticleId(Integer articleId) {
		this.articleId = articleId;
	}

	public Integer getTagId() {
		return tagId;
	}

	public void setTagId(Integer tagId) {
		this.tagId = tagId;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", articleId=").append(articleId);
		sb.append(", tagId=").append(tagId);
		sb.append(", serialVersionUID=").append(serialVersionUID);
		sb.append("]");
		return sb.toString();
	}
}